﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="DemoItemTemplate.aspx.cs" Inherits="DemoItemTemplate" Title="Untitled Page" %>

<%@ Register Src="SearchInGridControl.ascx" TagName="SearchInGridControl" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="updUpdate" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlList" runat="server">
                <uc1:SearchInGridControl ID="ctrlSearch" runat="server" TargetControlID="grdItemTemplate" ExcludedFieldsCSV="ID" />
                <asp:GridView ID="grdItemTemplate" runat="server" AutoGenerateColumns="False">
                    <Columns>
                        <asp:TemplateField Visible="false" HeaderText="Employee Id" AccessibleHeaderText="ID" ItemStyle-CssClass="GridFirstColumn">
                            <ItemTemplate>
                                <asp:Label ID="lblID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"ID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="First Name" AccessibleHeaderText="FirstName">
                            <ItemTemplate>
                                <asp:Label ID="lblFirstName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"FirstName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Last Name" AccessibleHeaderText="LastName">
                            <ItemTemplate>
                                <asp:Label ID="lblLastName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"LastName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Contact Number"  AccessibleHeaderText="ContactNo">
                            <ItemTemplate>
                                <asp:Label ID="lblContact" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"ContactNo") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Address" AccessibleHeaderText="Address">
                            <ItemTemplate>
                                <asp:Label ID="lblAddress" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Address") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
